from po.Base.Base import Base
from selenium.webdriver.common.by import By
import time
class Page2(Base):
    # 点击写信
    xx_loc=(By.XPATH,'/html/body/div[1]/nav/div[1]/ul/li[2]/span[2]')
    def xx(self):
        self.click(self.xx_loc)
    # 收件人
    sjr_loc=(By.CSS_SELECTOR,'.nui-editableAddr-ipt')
    def sjr(self):
        self.send_keys(self.sjr_loc,'3034738910@qq.com')
    # 主题
    zt_loc=(By.CLASS_NAME,'nui-ipt-input')
    def zt(self):
        self.send_keys(self.zt_loc,'测试报告')
    # # 框架
    # kj_loc=(By.XPATH,'/html/body/div[2]/div[1]/div[2]/div[1]/section/section/div/div[1]/div[1]/div[2]/div/iframe')
    # # 内容
    # nr_loc=(By.XPATH,'/html/body/div')
    # def nr(self):
    #     self.send_keys(self.nr_loc,'aaa')
    # 发送
    fs_loc=(By.CLASS_NAME,'nui-btn-text')
    def fs(self):
        self.click(self.fs_loc)

    def test_126xiexin(self):
        self.xx()
        time.sleep(2)
        self.sjr()
        time.sleep(2)
        self.zt()
        time.sleep(15)
        # self.frame(self.kj_loc)
        # time.sleep(2)
        # self.nr()
        # time.sleep(2)
        # self.tframe()
        self.fs()
        time.sleep(2)